<%
    response.setContentType("application/vnd.ms-excel"); //Tipo de fichero.
    response.setHeader("Content-Disposition", "attachment;filename=\"report.xls\"");
%>
<%@page pageEncoding="UTF-8"%>

<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>UPOBank</title>
    </head>
    <body>
        <table>
            <thead>
                <tr>
                    <th>Concepto</th>
                    <th>Fecha</th>
                    <th>Importe (EUR)</th>
                    <th>Saldo (EUR)</th>
                </tr>
            </thead>
            <tbody>
                <logic:iterate id="listaMovimientos" name="listaMovimientos">
                    <tr>
                        <td>
                            <bean:write name="listaMovimientos" property="concepto"/>
                        </td>
                        <td>
                            <bean:write name="listaMovimientos" property="fecha"/>
                        </td>
                        <td>
                            <fmt:formatNumber minIntegerDigits="1" pattern="##.##"><bean:write name="listaMovimientos" property="importe"/></fmt:formatNumber>
                            </td>
                            <td>
                            <fmt:formatNumber minIntegerDigits="1" pattern="##.##"><bean:write name="listaMovimientos" property="saldo"/></fmt:formatNumber>
                            </td>
                        </tr>
                </logic:iterate>
            </tbody>
        </table>
    </body>
</html>
